<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<input type="radio" checked="checked" />
		<script>
			function getRootPath_web() {
			  var curWwwPath = window.document.location.href;
			  var pathName = window.document.location.pathname;
			  var pos = curWwwPath.indexOf(pathName);
			  var localhostPaht = curWwwPath.substring(7, pos);
			  var projectName = pathName.substring(0, pathName.substr(1).indexOf('/') + 1);
			  return (localhostPaht + projectName);
			}
			
			console.info(getRootPath_web());
		</script>
	</body>
</html>
